<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="relext.css"/>
		<style type="text/css">
			.ipt1,.ipt2{
				width: 1500px;
				height: 50px;
				border-radius: 5px;
				margin-left: 15px;
				margin-top: 15px;
				border: 1px solid lightgray;
				font-size: 18px;
				padding-left: 10px;
			}
			.ipt3{
				width: 1500px;
				height: 50px;
				margin-left: 15px;
				margin-top: 15px;
				background-color: yellow;
				border: 1px solid white;
				font-size: 18px;
			}
			.hf1{
				color: dimgrey;
				float: left;
				margin-top: 10px;
				margin-left: 15px;
			}
			.hf2{
				color: dimgrey;
				float: left;
				margin-top: 10px;
				margin-left: 1370px;
			}
		</style>
	</head>
	<body>
		<ul id="login">
			<li><input type="text" name="username" placeholder="手机/邮箱" class="ipt1" id="username"/></li>
			<li><input type="password" name="pwd" placeholder="输入密码" class="ipt2" id="pwd"/></li>
			<li><input type="button" value="登录" class="ipt3" id="btn-login" onclick="login()"/></li>
		</ul>
		<div><a href="forgetPWD.html" class="hf1">忘记密码</a></div>
		<div><a href="register.html" class="hf2">立即注册</a></div>
	</body>
</html>
<script>
	function login() {
	 
	    var oUsername = document.getElementById("username");
	    var oPwd = document.getElementById("pwd");
		var oBtn-login = document.getElementById("btn-login");
	 
	    if (oUsername.value == "") {
	 
	        alert("请输入用户名");
	 
	    } else if (oPwd.value  == "") {
	 
	        alert("请输入密码");
	 
	    } else if(oUsername.value == "admin" && oPwd.value == "123456"){
	 
	        window.location.href="welcome.html";
	 
	    } else {
	 
	        alert("请输入正确的用户名和密码！")
	 
	    }
	}
</script>